﻿using System;
using Cosmos.Compiler.Builder;
using Cosmos.Hardware;
using Cosmos.Hardware.Storage.ATA;
using Cosmos.Sys.FileSystem;
using Cosmos.Sys.FileSystem.Ext2;
using Cosmos.Sys.FileSystem.FAT32;
using System.IO;
//using System.Drawing;
using CosView.GUI;

namespace CosView
{
    class V2Program
    {
        #region Cosmos Builder logic
        // Most users wont touch this. This will call the Cosmos Build tool
        [STAThread]
        static void Main(string[] args)
        {
            BuildUI.Run();
        }
        #endregion

        // Main entry point of the kernel
        public static void Init()
        {
            Drawer.Init();
            DrawerObject Titl = new DrawerObject(20, 1, 0, 0, ConsoleColor.Red, ConsoleColor.White);
            Titl.Text = "Test";
            Drawer.AddObject(Titl);
            DrawerObject Cont = new DrawerObject(20, 15, 0, 1, ConsoleColor.DarkGray, ConsoleColor.Gray);
            Cont.Text = "Hello, World!";
            DrawerObject Bott = new DrawerObject(20, 16, 0, 15, ConsoleColor.Gray, ConsoleColor.Gray);

            Bar bar1 = new Bar(0, 3, 20, 4);
            bar1.Text = "Bar1";
            bar1.IsActive = false;
            Bar bar2 = new Bar(0, 4, 20, 5);
            bar2.Text = "Bar2";
            bar2.IsActive = true;
            Bar bar3 = new Bar(0, 5, 20, 6);
            bar3.Text = "Bar3";
            bar3.IsActive = false;

            Drawer.AddObject(Cont);
            Drawer.AddObject(bar1);
            Drawer.AddObject(bar2);
            Drawer.AddObject(bar3);
            Drawer.AddObject(Bott);
            Drawer.Invalidate();

            while (true) { }
        }
    }
}
